package com.hdf.etdemo;

import com.hdf.easytools.base.EasyToolsActivity;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;

public class AbloutActivity extends EasyToolsActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_ablout);
		/** 设置标题显示 */
		this.TitleVisib(0, 1, 1, 1, 0);
		/** 绑定标题点击事件 */
		this.TitleClick(0, 1, 0, 1, 0);
		/** 设置标题样式ʽ */
		this.TitleStyle(null, R.drawable.et_back, "关于", "检查更新", 0);
		TiTRight.setTextColor(getResources().getColor(R.color.white));
		TextView tvablout=(TextView) findViewById(R.id.ablout);
		TextView version=(TextView) findViewById(R.id.etversion);
		version.setText("版本:"+getResources().getString(R.string.et_version));
		tvablout.setText(ToDBC(getResources().getString(R.string.ablout)));
	}
	/** 
     * 半角转换为全角 
     *  
     * @param input 
     * @return 
     */  
    public static String ToDBC(String input) {  
        char[] c = input.toCharArray();  
        for (int i = 0; i < c.length; i++) {  
            if (c[i] == 12288) {  
                c[i] = (char) 32;  
                continue;  
            }  
            if (c[i] > 65280 && c[i] < 65375)  
                c[i] = (char) (c[i] - 65248);  
        }  
        return new String(c);  
    }  
    @Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.left_img:
			finish();
			break;

		default:
			break;
		}
	}

	
}
